package com.itheima.d3_inner_class3;

public class Test {
    public static void main(String[] args) {
        go(new Swimming(){
            @Override
            public void swim() {
                System.out.println("匿名内部类实现游泳");
            }
        });


    }
    public static void go(Swimming s){
        System.out.println("开始游泳");
        s.swim();
    }
}


interface Swimming{
    void swim();
}